package cn.lcl.services.impl;

import cn.hutool.system.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import cn.lcl.mapper.UuuMapper;
import cn.lcl.beans.Uuu;
import cn.lcl.beans.UuuExample;
import cn.lcl.services.UuuService;
@Service
public class UuuServiceImpl implements UuuService{

    @Resource
    private UuuMapper uuuMapper;

    @Override
    public int deleteByIds(Integer... ids) {
        return uuuMapper.deleteByIds(ids);
    }

    @Override
    public Uuu login(Uuu uuu) {
        List<Uuu> list = uuuMapper.findall(uuu);
        System.out.println("list = " + list);
        if(list.isEmpty() || list.size() > 1) {
            return null;
        }
        return list.get(0);
    }

    @Override
    public long countByExample(UuuExample example) {
        return uuuMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(UuuExample example) {
        return uuuMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return uuuMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Uuu record) {
        return uuuMapper.insert(record);
    }

    @Override
    public int insertSelective(Uuu record) {
        return uuuMapper.insertSelective(record);
    }

    @Override
    public List<Uuu> selectByExample(UuuExample example) {
        return uuuMapper.selectByExample(example);
    }

    @Override
    public Uuu selectByPrimaryKey(Integer id) {
        return uuuMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(Uuu record,UuuExample example) {
        return uuuMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Uuu record,UuuExample example) {
        return uuuMapper.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Uuu record) {
        return uuuMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Uuu record) {
        return uuuMapper.updateByPrimaryKey(record);
    }

}
